﻿#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include "PictureBox.h"
#include<opencv2/core.hpp>
#include "qtOpenCV/convert.h"
#include "opencvBuildingBlock/ImageRotate.h"
#include "opencvBuildingBlock/PyramidTemplateMatch.h"
#include "opencvBuildingBlock/RotateTemplateMatch.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Dialog; }
QT_END_NAMESPACE

class Dialog : public QDialog
{
    Q_OBJECT

public:
    Dialog(QWidget *parent = nullptr);
    ~Dialog();

private slots:
    void on_pushButtonOpenTemplate_clicked();

    void on_pushButtonOpenImage_clicked();

    void on_pushButtonRunMatch_clicked();

private:
    Ui::Dialog *ui;
    PictureBox * box1;
    PictureBox * box2;

    QString m_path;
//    Qly::RotateTemplateMatch m_rotateMatcher;
    Qly::PyramidTemplateMatch * m_pPyramidMatcher;

    QImage m_templateImage;
    QImage m_testImage;
    QImage m_featureImage;
    cv::Mat model; //模板图
    cv::Mat testImg; //测试图
    cv::Mat featureImg; //特征点图
    cv::Mat resultImg; //结果图
};
#endif // DIALOG_H
